import {LESSON_SERVER_AXIOS} from '@/api/axios';

// POST - 下单购买视频: 添加一条 [订单] 和多条 [订单明细]
export const BUY = (params) => LESSON_SERVER_AXIOS.post("/order/buy", params);
// GET - 分页查询订单明细: 分页查询指定 [用户] 关联的 [订单明细]
export const PAGE_ORDER_DETAIL = (pageNum, pageSize) => LESSON_SERVER_AXIOS.get("/order/pageOrderDetail", {
    params: {pageNum, pageSize}
});
// POST - 删除一条订单明细: 按 [订单明细表主键] 删除一条 [订单明细]
export const DELETE_ORDER_DETAIL = (orderDetailId) => LESSON_SERVER_AXIOS.post(`/order/deleteOrderDetail/${orderDetailId}`);
// POST - 删除一条订单: 按 [订单表主键] 删除一条 [订单] 以及该 [订单] 关联的全部 [订单明细]
export const DELETE_ORDER = (orderId) => LESSON_SERVER_AXIOS.post(`/order/deleteOrder/${orderId}`);


